<%@ Page Language="c#" Inherits="EPiServer.Research.Wiki.Pages.Search" CodeBehind="Search.aspx.cs" MasterPageFile="~/Templates/RelatePlus/MasterPages/RelatePlus.Master" %>
<%@ Register TagPrefix="Wiki" TagName="LeftMenu" Src="~/Templates/WikiX/Units/LeftMenu.ascx" %>

<asp:Content runat="server" ContentPlaceHolderID="plhLeftContentArea">
    <Wiki:LeftMenu runat="server" MenuProperty="LeftMenuSearch" />    
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="plhMainContentArea">
    <div class="ArticleView">
        <div class="ArticleViewHead">
            <div class="ArticleHead">
                <h1>
                    <EPiServer:Translate ID="caption" runat="server" Text="/wiki/search/title" StringFormatObjects='<%# new object[]{HttpContext.Current.Items["Query"]} %>' />
                </h1>
                  <div style="clear:both;">
                        <asp:CheckBox ID="cbAdvancedSearch" runat="server" Text="Search on PageName only" AutoPostBack="true" />                 
                    </div>
            </div>
            <div class="ModeLabel">
                <p>               
                </p>
            </div>
        </div>
        <div class="ArticleViewBody">
            <div id="ResultArea">
                <EPiServer:PageList ID="SearchRes" runat="server" Visible="false" Paging="true" PagesPerPagingItem="20">
                    <HeaderTemplate>
                        <ul>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <li><a href="<%# Eval("LinkUrl") %>">
                            <%# GetTitle(Container.DataItem) %></a> &nbsp;(<span id="Span1" class="dateTime"><%# DataBinder.Eval(Container.DataItem, "Changed", "{0:d}")%></span>)
                            <p>
                                <%#  EPiServer.Research.Wiki.WikiManager.Instance.GetPreviewText(Container.DataItem, CurrentPage.PageLink) %>
                            </p>
                        </li>
                    </ItemTemplate>
                    <FooterTemplate>
                        </ul>
                    </FooterTemplate>
                </EPiServer:PageList>
                <h2 id="NoSearchResult" runat="server" visible="false">
                    <EPiServer:Translate runat="server" ID="FoundRes" Text="/wiki/search/noresultsfound" />   
                    <asp:HyperLink ID="hlNewArticle" runat="server" />
                </h2>
               
            </div>
        </div>
    </div>
    <EPiServer:SearchDataSource ID="SearchDataSource" runat="server" EnableVisibleInMenu="false">
        <SelectParameters>
            <EPiServer:PropertyParameter Name="PageLink" PropertyName="PageLink" />
        </SelectParameters>
    </EPiServer:SearchDataSource>
</asp:Content>
